package cn.edu.sgu.www.mhxysy.mapper.chongwu_equipment;

import cn.edu.sgu.www.mhxysy.entity.chongwu_equipment.ChongwuEquipment;
import cn.edu.sgu.www.mhxysy.vo.chongwu_equipment.ChongwuEquipmentVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Repository
public interface ChongwuEquipmentMapper extends BaseMapper<ChongwuEquipment> {

	/**
	 * 查询宠物穿戴的同类型的装备件数
	 * @param objectMap 宠物装备信息
	 * @return int 宠物穿戴的同类型的装备件数
	 */
	int selectSameType(Map<String, Object > objectMap);

	/**
	 * 通过宠物ID查询宠物装备类型
	 * @param chongwuId 宠物ID
	 * @return List<ChongwuEquipmentCategoryVO>
	 */
	List<ChongwuEquipmentVO> getWeardEquipments(@Param("chongwuId") String chongwuId);

	/**
	 * 查询宠物装备列表
	 * @param type 宠物装备类型
	 * @param roleId 角色ID
	 * @param chongwuId 宠物ID
	 * @return List<ChongwuEquipment>
	 */
    List<ChongwuEquipment> select(
			@Param("type") Integer type,
			@Param("roleId") String roleId,
			@Param("chongwuId") String chongwuId
	);
}